/*
 * @Description: category控制器
 * @Author: Junhuang
 * @Date: 2022-02-10 13:01:02
 * @LastEditTime: 2022-02-10 13:04:11
 * @LastEditors: Junhuang
 * @Reference: 
 */
'use strict';

const Controller = require('egg').Controller;

class CategoryController extends Controller {
  // 注册
  async index() {
    const { ctx, app } = this;
    let res = await app.model.Category.findAll();
    ctx.apiSuccesss(res);
  }
}

module.exports = CategoryController;